<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>

<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />

<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp">
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">该页面展示了网站所有的普工简历信息，可对普工简历进行审核删除操作。</div>
<div class="admin_new_tip_list">可输入名称关键字进行搜索，也可进行详细的高级搜索。</div>
</div>
</div>

<div class="clear"></div>

<div class="admin_new_search_box"> 
  <form action="index.php" name="myform" method="get">
    <input name="m" value="admin_tiny" type="hidden"/>
	<div class="admin_new_search_name">搜索类型：</div>
     <div class="admin_Filter_text formselect" did='dtype'>
        <input type="button" {yun:}if $smarty.get.type=='1'||$smarty.get.type==''{/yun} value="用户姓名" {yun:}elseif $smarty.get.type=='2'{/yun} value="意向职位" {yun:}elseif $smarty.get.type=='3'{/yun} value="手机号码" {yun:}/if{/yun} class="admin_Filter_but" id="btype">
        <input type="hidden" name="type" id="type" value="{yun:}if $smarty.get.type{/yun}{yun:}$smarty.get.type{/yun}{yun:}else{/yun}1{yun:}/if{/yun}"/>
        <div class="admin_Filter_text_box" style="display:none" id="dtype">
          <ul>
            <li><a href="javascript:void(0)" onClick="formselect('1','type','用户姓名')">用户姓名</a></li>
            <li><a href="javascript:void(0)" onClick="formselect('2','type','意向职位')">意向职位</a></li>
            <li><a href="javascript:void(0)" onClick="formselect('3','type','手机号码')">手机号码</a></li>
 
          </ul>
        </div>
      </div>
      <input type="text" placeholder="输入你要搜索的关键字" value="{yun:}$smarty.get.keyword{/yun}" name='keyword' class="admin_Filter_search">
      <input type="submit" name='search' value="搜索" class="admin_Filter_bth">
	<a  href="javascript:void(0)" onclick="$('.admin_screenlist_box').toggle();"   class="admin_new_search_gj">高级搜索</a></form>


  
  {yun:}include file="admin/admin_search.htm"{/yun}
  </div>
<div class="clear"></div> 

  <div class="table-list">
    <div class="admin_table_border">
      <iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
      <form action="index.php" target="supportiframe" name="myform" method="get" id='myform'>
        <input name="m" value="admin_tiny" type="hidden"/>
        <input name="c" value="del" type="hidden"/>
        <input type="hidden" name="pytoken" id="pytoken" value="{yun:}$pytoken{/yun}">
        <table width="100%">
          <thead>
            <tr class="admin_table_top">
              <th width="20"><label for="chkall">
                <input type="checkbox" id='chkAll' onclick='CheckAll(this.form)'/>
                </label></th>
              <th width="80"> {yun:}if $smarty.get.t=="id" && $smarty.get.order=="asc"{/yun} <a href="index.php?m=admin_tiny&order=desc&t=id">简历编号<img src="images/sanj.jpg"/></a> {yun:}else{/yun} <a href="index.php?m=admin_tiny&order=asc&t=id">简历编号 <img src="images/sanj2.jpg"/></a> {yun:}/if{/yun} </th>
              <th align="left">姓名</th>
              <th align="left">性别</th>
              <th align="left">工作年限</th>
              <th align="left">意向职位</th>
              <th>手机</th>
              <th> {yun:}if $smarty.get.t=="time" && $smarty.get.order=="asc"{/yun} <a href="index.php?m=admin_tiny&order=desc&t=time">发布时间 <img src="images/sanj.jpg"/></a> {yun:}else{/yun} <a href="index.php?m=admin_tiny&order=asc&t=time">发布时间 <img src="images/sanj2.jpg"/></a> {yun:}/if{/yun} </th>
              <th>状态</th>
              <th width="120">操作</th>
            </tr>
          </thead>
          <tbody>
          
          {yun:}foreach item=v key=key from=$rows{/yun}
          <tr align="center" {yun:}if ($key+1)%2=='0'{/yun}class="admin_com_td_bg"{yun:}/if{/yun} id="list{yun:}$v.id{/yun}">
            <td><input type="checkbox" class="check_all" value="{yun:}$v.id{/yun}" name='del[]' onclick='unselectall()' rel="del_chk"/></td>
            <td align="center" class="td1" width="80"><span>{yun:}$v.id{/yun}</span></td>
            <td class="ud" align="left"><a href="index.php?m=admin_tiny&c=show&id={yun:}$v.id{/yun}" class="admin_cz_sc">{yun:}$v.username{/yun}</a></td>
            <td class="od" align="left">{yun:}$v.sex{/yun}</td>
            <td class="gd" align="left">{yun:}$v.exp{/yun}</td>
            <td align="left">{yun:}$v.job{/yun}</td>
            <td>{yun:}$v.mobile{/yun}</td>
            <td>{yun:}$v.time|date_format:"%Y-%m-%d"{/yun}</td>
            <td>{yun:}if $v.status==1{/yun}<span class="admin_com_Audited">已审核</span>{yun:}elseif $v.status==0{/yun}<span class="admin_com_noAudited">未审核</span>{yun:}else{/yun}<span class="admin_com_Lock">已过期</span>{yun:}/if{/yun}</td>
            <td>
             <div class="admin_new_bth_c">
            <a href="javascript:void(0)" class="admin_new_c_bth admin_new_c_bthsh" onClick="show_status('{yun:}$v.id{/yun}');">审核</a>
            <a href="index.php?m=admin_tiny&c=show&id={yun:}$v.id{/yun}"class="admin_new_c_bth admin_new_c_bth_yl">预览</a> 
            </div>
            <a href="index.php?m=admin_tiny&c=edit&id={yun:}$v.id{/yun}"class="admin_new_c_bth">修改</a>
            <a href="javascript:void(0)" onClick="layer_del('确定要删除？','index.php?m=admin_tiny&c=del&id={yun:}$v.id{/yun}');"class="admin_new_c_bth admin_new_c_bth_sc">删除</a></td>
          </tr>
          {yun:}/foreach{/yun}
          <tr style="background:#f1f1f1;">
            <td align="center"><input type="checkbox" id='chkAll2' onclick='CheckAll2(this.form)' /></td>
            <td colspan="5" ><label for="chkAll2">全选</label>
              &nbsp;
              <input class="admin_button" type="button" name="delsub" value="删除所选" onClick="return really('del[]')" />
              &nbsp;&nbsp;
              <input class="admin_button" type="button" name="delsub" value="批量审核" onClick="audall('1');" />
              &nbsp;&nbsp;
              <input class="admin_button" type="button" name="delsub" value="批量取消审核" onClick="audall('0');" /></td>
            <td colspan="5" class="digg">{yun:}$pagenav{/yun}</td>
          </tr>
          </tbody>
          
        </table>
      </form>
    </div>
  </div>
</div>
<div id="preview"  style="display:none;width:460px ">
  <div style="width:460px;" >
  <form method="post"  class="layui-form">
    <input id="statusid" type="hidden">
    
    
  <table cellspacing='1' cellpadding='1' class="admin_examine_table table_form" style="width:100%; font-size:12px;">      <tr class="admin_table_trbg">
         <th width="110">姓名：</th>
        <td id="username"></td>
      </tr>
      <tr>
        <th>性别：</th>
        <td id="sex"></td>
      </tr>
      <tr class="admin_table_trbg">
        <th>工作年限：</th>
        <td id="exp"></td>
      </tr>
      <tr>
        <th>意向职位：</th>
        <td id="job"></td>
      </tr>
      <tr class="admin_table_trbg">
        <th>手机：</th>
        <td id="mobile"></td>
      </tr>
      <tr>
        <th>自我介绍：</th>
        <td><div style="max-height:70px; _height:70px; overflow:hidden; overflow-y:auto"><div class="" id="production"></div></div></td>
      </tr>
      <tr class="admin_table_trbg">
        <th>时　　间：</th>
        <td id="time"></td>
      </tr>
     <tr>
    <th width="80">审核操作：</th>
      <td align="left">

	   	   <div class="layui-form-item">
                  <div class="layui-input-block">
                    <div class="layui-input-inline">
                      	<input name="status" id="status_1" value="1" title="已审核" type="radio"/>
							<input name="status" id="status_0" value="0" title="未审核" type="radio"/>
                    </div>
                  </div>
             </div>	
	   </td>
     </tr>
     
 <tr>
           <td colspan='2' align="center">
   <div class="admin_Operating_sub">         <input class="layui-btn layui-btn-normal" type="button" onClick="check_status();" value="提交" ></div></td>
   </tr>
   
    
     </table>
	   </form>
  </div>
</div>
<script type="text/javascript">
  layui.use(['layer', 'form'], function(){
    var layer = layui.layer
    ,form = layui.form
    ,$ = layui.$;
  });

function audall(status){
	var codewebarr="";
	$(".check_all:checked").each(function(){ //由于复选框一般选中的是多个,所以可以循环输出
		if(codewebarr==""){codewebarr=$(this).val();}else{codewebarr=codewebarr+","+$(this).val();}
	});
	if(codewebarr==""){
		 parent.layer.msg('您还未选择任何信息！', 2, 8);	return false;
	}else{
		var pytoken=$("#pytoken").val();
		$.post("index.php?m=admin_tiny&c=status",{allid:codewebarr,status:status,pytoken:pytoken},function(data){
			if(data=="1") {
				parent.layer.msg('批量审核成功！', 2, 9,function(){window.location.reload();});

			}else{
				parent.layer.msg('批量取消审核成功！', 2, 9,function(){window.location.reload();});
			}
		});
	}
}
function show_status(id){
	$.get("index.php?m=admin_tiny&c=ajax&id="+id,function(data){
		var data=eval('('+data+')');
		$("#username").html(data.username);
		$("#sex").html(data.sex);
		$("#exp").html(data.exp);
		$("#job").html(data.job);
		$("#mobile").html(data.mobile);
		$("#production").html(data.production);
		$("#time").html(data.time);
		$("#status_"+data.status).attr("checked","checked");
		layui.use(['form'],function(){
			var form = layui.form;
			form.render();
		});
		$("#statusid").val(id);
		$.layer({
			type : 1,
			title : '审核操作',
			closeBtn : [0 , true],
			offset : ['20%' , '30%'],
			border : [10 , 0.3 , '#000', true],
			area : ['460px','auto'],
			page : {dom : '#preview'}
		});
	})
}
function check_status(){
	var id=$("#statusid").val();
	var status=$("input[name='status']:checked").val();
	var pytoken=$("#pytoken").val();
	parent.layer.load('执行中，请稍候...',0);
	$.post("index.php?m=admin_tiny&c=status",{allid:id,status:status,pytoken:pytoken},function(data){
		if(data=="1"){
			parent.layer.msg('审核成功！', 2, 9,function(){window.location.reload();});
		}else{
			parent.layer.msg('取消审核成功！', 2, 9,function(){window.location.reload();});
		}
	});
}
</script>
</body>
</html>
